package Leetcode第一期;

/**
 * @author : K k
 * @date : 10:45 2020/5/6
 */
public class 左旋转字符串_58_2 {
    public static void main(String[] args) {
        String s="abcdefg";
        s=reverseLeftWords(s,2);
    }

    public static String reverseLeftWords(String s, int n) {
        String substring1 = s.substring(0, n);
        System.out.println(substring1);
        String substring = s.substring(n, s.length());
        System.out.println(substring);
        StringBuilder result=new StringBuilder();
        return result.append(substring).append(substring1).toString();
    }
}
